package com.huluspace.learnhub.ai;

import com.fasterxml.jackson.databind.ObjectMapper;

public class AIUtils {
  private static final ObjectMapper objectMapper = new ObjectMapper();

  public static AIContentResult parse(String json) {
    try {
      return objectMapper.readValue(json, AIContentResult.class);
    } catch (Exception e) {
      throw new RuntimeException("AI 内容解析失败: " + e.getMessage(), e);
    }
  }
}
